// role2id
export function role2id(role: string): number {
  switch (role) {
    case '法师':
      return 1
    case '战士':
      return 2
    case '暗影':
      return 3
    case '机器':
      return 4
    case '龙':
      return 5
    case '刀锋':
      return 6
    case '弓':
      return 7
    case '萝莉':
      return 8
    default:
      return 0
  }
}

// id2role
export function id2role(id: number): string {
  switch (id) {
    case 1:
      return '法师'
    case 2:
      return '战士'
    case 3:
      return '暗影'
    case 4:
      return '机器'
    case 5:
      return '龙'
    case 6:
      return '刀锋'
    case 7:
      return '弓'
    case 8:
      return '萝莉'
    default:
      return ''
  }
}
